POV-Ray : Newsgroups : povray.general : Help needed with 'media' : Help needed with 'media' Server Time
13 Aug 2024 01:18:06 EDT (-0400)
  Help needed with 'media'  
From: Andrew Cocker
Date: 30 Nov 1998 14:18:05
Message: <3662ef6d.0@news.povray.org>
Hi,
    Please help me with this annoying problem.
    I have created a union of a sphere ( at origin, radius 1,textured mainly
Red, but with Clear patches), a light_source, (also at origin
media_attenuation on), and a final sphere ( also at origin, radius 2}.
    How do I add media to the larger sphere, so that the shafts of light
coming from within the smaller sphere are visible? I've tried following the
documentation, but the outer sphere is invisible.
    Here's my code ( it's messy, I know).

Thanks in advance.

Andy C.

// ==== Standard POV-Ray Includes ====
#include "colors.inc" // Standard Color definitions
#include "textures.inc" // Standard Texture definitions

camera
{
  location  <0.0 , 4.0 ,-8.0>
  look_at   <0.0 , 0.0 , 0.0>
}

light_source
{
  0*x
  color red 1.0  green 1.0  blue 1.0
  translate <-20, 40, -20>
media_attenuation off
}

union {
sphere {<0,0,0>,1 texture

    pigment

    spotted color_map {
                [0 Red][.6 Red][.61 Clear][.9 Clear][.91 Red][1 Red]}
                }
                scale .2}
}

light_source
{  0*x   color red 1.0  green 1.0  blue 1.0
  translate <0, 0, 0>
media_attenuation on}

// Add media
sphere {<0,0,0>,2 pigment {rgbf<1,1,1,1>}
        interior {
        media {
  intervals 40
  scattering {1, rgb 0.02}
  samples 1, 10
  confidence 0.9999
  variance 1/1000
  ratio 0.9
}
        }
}

}


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.